package com.tangcco.lockwell.service.impl;

import com.tangcco.lockwell.domain.WrongQuestion;
import com.tangcco.lockwell.repository.WrongQuestionMapper;
import com.tangcco.lockwell.service.WrongQuestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/*薛明宇*/
@Service
public class WrongQuestionServiceImpl implements WrongQuestionService {
    private final WrongQuestionMapper wrongQuestionMapper;
    @Autowired
    public WrongQuestionServiceImpl(WrongQuestionMapper wrongQuestionMapper) {
        this.wrongQuestionMapper = wrongQuestionMapper;
    }
    //根据用户Id查询错题
    @Override
    public List<WrongQuestion> selectWrongQuestionsByUserId(int userId,Integer subjectId) {
        return wrongQuestionMapper.selectWrongQuestionsByUserId(userId,subjectId);
    }

    @Override
    public List<WrongQuestion> selectList(WrongQuestion wrongQuestion) {
        return wrongQuestionMapper.selectList(wrongQuestion);
    }

    @Override
    public int insertSelective(WrongQuestion wrongQuestion) {
        return wrongQuestionMapper.insertSelective(wrongQuestion);
    }

    @Override
    public int updateByPrimaryKeySelective(WrongQuestion wrongQuestion) {
        return wrongQuestionMapper.updateByPrimaryKeySelective(wrongQuestion);
    }
}
